package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DeviceStatusInfoMapper;
import com.ruoyi.system.domain.DeviceStatusInfo;
import com.ruoyi.system.service.IDeviceStatusInfoService;

/**
 * 设备上下线记录Service业务层处理
 * 
 * @author 刘进祥
 * @date 2025-02-14
 */
@Service
public class DeviceStatusInfoServiceImpl implements IDeviceStatusInfoService 
{
    @Autowired
    private DeviceStatusInfoMapper deviceStatusInfoMapper;

    /**
     * 查询设备上下线记录
     * 
     * @param id 设备上下线记录主键
     * @return 设备上下线记录
     */
    @Override
    public DeviceStatusInfo selectDeviceStatusInfoById(Long id)
    {
        return deviceStatusInfoMapper.selectDeviceStatusInfoById(id);
    }

    /**
     * 查询设备上下线记录列表
     * 
     * @param deviceStatusInfo 设备上下线记录
     * @return 设备上下线记录
     */
    @Override
    public List<DeviceStatusInfo> selectDeviceStatusInfoList(DeviceStatusInfo deviceStatusInfo)
    {
        return deviceStatusInfoMapper.selectDeviceStatusInfoList(deviceStatusInfo);
    }

    /**
     * 新增设备上下线记录
     * 
     * @param deviceStatusInfo 设备上下线记录
     * @return 结果
     */
    @Override
    public int insertDeviceStatusInfo(DeviceStatusInfo deviceStatusInfo)
    {
        return deviceStatusInfoMapper.insertDeviceStatusInfo(deviceStatusInfo);
    }

    /**
     * 修改设备上下线记录
     * 
     * @param deviceStatusInfo 设备上下线记录
     * @return 结果
     */
    @Override
    public int updateDeviceStatusInfo(DeviceStatusInfo deviceStatusInfo)
    {
        return deviceStatusInfoMapper.updateDeviceStatusInfo(deviceStatusInfo);
    }

    /**
     * 批量删除设备上下线记录
     * 
     * @param ids 需要删除的设备上下线记录主键
     * @return 结果
     */
    @Override
    public int deleteDeviceStatusInfoByIds(Long[] ids)
    {
        return deviceStatusInfoMapper.deleteDeviceStatusInfoByIds(ids);
    }

    /**
     * 删除设备上下线记录信息
     * 
     * @param id 设备上下线记录主键
     * @return 结果
     */
    @Override
    public int deleteDeviceStatusInfoById(Long id)
    {
        return deviceStatusInfoMapper.deleteDeviceStatusInfoById(id);
    }
}
